package cn.lg.soar.database.base.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 保存数据类
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Getter
@Setter
@ApiModel(value = "保存数据类", description = "保存数据类")
public class SaveVo<T> implements ISaveVo<T> {

    public SaveVo() { }

    public SaveVo(@NotNull T model) {
        this.model = model;
    }

    @Valid
    @ApiModelProperty(value = "要保存的业务数据")
    @NotNull(message = "数据不能为空")
    T model;

    @ApiModelProperty(value = "附件id列表")
    private List<Serializable> fileIds;

    @ApiModelProperty(value = "删除的附件id列表")
    private List<Serializable> deleteFileIds;

}
